﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="user.ascx.cs" Inherits="TrangSucShop.administrator.AdminUsercontrol.user" %>


<asp:MultiView runat="server" ActiveViewIndex="0" ID="MT1">
<asp:View runat="server" ID="Manager">
 <table style="width:100%;">
    <tr>
        <th colspan="3">
            <h1>Quản Lý Khách Hàng</h1> </th>
    </tr>
    <tr>
        <th colspan="3" height="50">
             <asp:Label ID="Label1" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
             </th>
    </tr>
    <tr>
        <td colspan="3" align="center">
            <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID"
                AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" 
                BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" 
                GridLines="Vertical" Font-Size="Larger" 
                onrowcommand="GridView1_RowCommand" onrowdatabound="GridView1_RowDataBound" 
                onrowdeleted="GridView1_RowDeleted" onrowdeleting="GridView1_RowDeleting" 
                onrowediting="GridView1_RowEditing" UseAccessibleHeader="False" 
                Width="100%" AllowPaging="True" 
                onpageindexchanging="GridView1_PageIndexChanging" 
                >
                <PagerSettings FirstPageText="&lt;&lt;" LastPageText="&gt;&gt;" 
                    Mode="NumericFirstLast" NextPageText="&gt;" PreviousPageText="&lt;" />
                <RowStyle BackColor="#F7F7DE" />
                <Columns>
                    <asp:BoundField DataField="MaKhachHang" HeaderText="Mã" HeaderStyle-Width="70" >
<HeaderStyle Width="70px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TenKhachHang" HeaderText="Họ Tên" 
                        HeaderStyle-Width="250">
<HeaderStyle Width="250px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Username" HeaderText="Tên Đăng Nhập" 
                        HeaderStyle-Width="150" >
<HeaderStyle Width="150px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SoDienThoai" HeaderText="Sô điện thoại" 
                        HeaderStyle-Width="150">
<HeaderStyle Width="150px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                   
                    <asp:BoundField DataField="TaiKhoan" HeaderText="Tài khoản" 
                        HeaderStyle-Width="150">
<HeaderStyle Width="150px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TenQuyen" HeaderText="Quyền" HeaderStyle-Width="150">
                    
<HeaderStyle Width="150px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="IsBad" HeaderText="Xấu" >
                        <ControlStyle Width="100px" />
                        <HeaderStyle Width="100px" />
                        <ItemStyle HorizontalAlign="Center" Width="100px" />
                    </asp:CheckBoxField>
                    <asp:TemplateField HeaderText="Sửa">
     <ItemTemplate>
       <asp:LinkButton ID="LinkButton2" 
         CommandArgument='<%# Eval("ID") %>' 
         CommandName="Edit" runat="server">
         Sửa</asp:LinkButton>
     </ItemTemplate>
                        <ControlStyle Width="100px" />
                        <HeaderStyle Width="100px" />
                        <ItemStyle HorizontalAlign="Center" Width="100px" />
   </asp:TemplateField>
                   <asp:TemplateField HeaderText="Xóa">
     <ItemTemplate>
       <asp:LinkButton ID="LinkButton1" 
         CommandArgument='<%# Eval("ID") %>' 
         CommandName="Delete" runat="server">
         Xóa</asp:LinkButton>
     </ItemTemplate>
                       <ControlStyle Width="100px" />
                       <HeaderStyle Width="100px" />
                       <ItemStyle HorizontalAlign="Center" Width="100px" />
   </asp:TemplateField>

                    
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Right" 
                    BorderColor="#CCCCCC" Font-Overline="False" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</asp:View>
<asp:View runat="server" ID="Edit">


    <table style="width:100%;">
        <tr>
            <th colspan="4"><h1>
                Thông Tin Khách Hàng
            </h1>
                &nbsp;</th>
        </tr>
        <tr>
            <th colspan="4">
                <asp:Label ID="Label3" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
            </th>
        </tr>
        <tr>
            <td>
                Mã Khách Hàng:</td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td width="150">
                Tên Đăng Nhập:</td>
            <td>
                <asp:TextBox ID="TextBox6" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Tên Khách Hàng:</td>
            <td>
                <asp:TextBox ID="TextBox2" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td class="style1">
                Quyền:</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server" Width="200px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Địa Chỉ:</td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td>
                Tài Khoản:</td>
            <td>
                <asp:TextBox ID="TextBox7" runat="server" Width="200px"></asp:TextBox>
                <asp:Label ID="Label2" runat="server" Text="0" Visible="False"></asp:Label>
                <asp:RangeValidator ID="RangeValidator2" runat="server" 
                    ControlToValidate="TextBox7" ErrorMessage="tài khoản phải là số" 
                    MaximumValue="99999999999" MinimumValue="0"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td>
                Email:</td>
            <td>
                <asp:TextBox ID="TextBox4" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Số Điện Thoại</td>
            <td>
                <asp:TextBox ID="TextBox5" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Ghi Chú</td>
            <td colspan="3">
                <asp:TextBox ID="TextBox9" runat="server" TextMode="MultiLine" Width="800px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Lưu" Width="100px" 
                    onclick="Button1_Click" />
            </td>
        </tr>
    </table>


</asp:View>
</asp:MultiView>